import typescript from 'rollup-plugin-typescript2'

export default {
  input: './src/index.ts',
  output: {
    file: './scripts/index.js',
    format: 'iife',
    banner: `// ==UserScript==
// @name         Ecommerce Helper
// @namespace    http://tampermonkey.net/
// @version      1.3.0
// @description  download product image
// @author       birdpeace
// @match        https://detail.1688.com/offer/*
// @match        https://my.xiapibuy.com/*
// @match        https://*.shopeex.cn/*
// @match        https://seller.my.shopee.cn/*
// @require      http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js
// @grant        MIT
// ==/UserScript==
    `,
  },
  plugins: [
    typescript({
      tsconfigOverride: {
        compilerOptions: {
          module: 'ESNext',
        },
      },
    }),
  ],
}
